# Scripts\game_manager.gd
extends Node3D

@onready var _pase_menu: Control = $"UI/PauseMenu"

func toggle_pause():
	# print(get_tree().paused)
	# 获取整个场景树, 然后暂停
	get_tree().paused = !get_tree().paused
	# 场景暂停时, 显示控制面板
	# _pase_menu.visible = get_tree().paused
	if get_tree().paused:
		_pase_menu.open()
	else:
		_pase_menu.close()

# 按下Exit按钮触发
func _on_exit_pressed() -> void:
	print("Return to the title scene.")
